import requsets from '@/plugins/requests'

// 获取销售额统计
export const amountCollectAPI = ({ collectType, start, end }) => requsets({
  url: `/api/order-service/report/amountCollect/${collectType}/${start}/${end}`
})
// 根据地区汇总销售额数据(销售量分布)
export const regionCollectAPI = ({ start, end }) => requsets({
  url: `/api/order-service/report/regionCollect/${start}/${end}`
})
// 获取销售前几的商品
export const skuTopAPI = ({ topNum, start, end }) => requsets({
  url: `/api/order-service/report/skuTop/${topNum}/${start}/${end}`
})
// 获取当时工单汇总信息(人员统计头部信息)
export const taskReportInfoAPI = ({ start, end }) => requsets({
  url: `/api/task-service/task/taskReportInfo/${start}/${end}`
})
// 销售统计的两个接口
// 获取一定时间范围之内的订单总数
export const orderCountAPI = ({ start, end }) => requsets({
  url: '/api/order-service/report/orderCount',
  params: {
    start,
    end
  }
})
// 获取一定时间范围之内的收入
export const orderAmountAPI = ({ start, end }) => requsets({
  url: '/api/order-service/report/orderAmount',
  params: {
    start,
    end
  }
})
// 获取合作商总数
export const partnerCountAPI = () => requsets({
  url: '/api/user-service/partner/count'
})
// 获取点位总数
export const nodeCountAPI = () => requsets({
  url: '/api/vm-service/node/count'
})
// 合作商点位汇总统计
export const nodeCollectAPI = () => requsets({
  url: '/api/vm-service/node/nodeCollect'
})
